home *** CD-ROM | disk | FTP | other *** search
-
- #include <dos.h>
-
- void interrupt (*oldint)();
-
- main()
- {
-
- int status;
-
- oldint=getvect(0x50); /* Save the interrupt vector before use
- */
-
-
- geninterrupt(5); /* Call Interrupt 05h to print the screen
-
- status=peekb(0x0050,0); /* Check the status of the Print Screen
- Operation */
-
- if(status==0) /* Print Screen successful */
- exit(0);
- else
- if(status==1) /* Print Screen Interrupt in use */
- printf("Screen printing in progress.");
- else /* Error occured */
- {
- printf("Error, couldn't print the screen at this time.");
- printf("\nProgram terminating!");
- exit(0);
- }
-
- setvect(0x50,oldint); /* Reset the interrupt vector */
-
- }
-